<!-- 用户上级查看表 -->

<div class="crumb-wrap">
    <div class="crumb-list"> <i class="icon-font"></i>
        <a href="<?=site_url()?>">首页</a>
        <!-- <span class="crumb-step">&gt;</span>
        <a class="crumb-name" href="<?=site_url('users/index')?>">用户管理</a> -->
        <span class="crumb-step">&gt;</span>
        <span>用户层级</span>
    </div>
</div>


<div class="result-wrap">
        <div class="result-content">
            <table class="result-tab" width="100%">
                <tr style="background: #eee">
                    <td colspan="10">当前用户层级： <?=$tier+1?> 级;&nbsp;&nbsp;  用户数据： <?=count($list)?> 人
                    <?php if($tier+1 > 1):?>
                        <br />
                        <a href="javascript:;" onclick="history.go(-1)">>>>返回</a>&nbsp;&nbsp;
                        <a href="<?=site_url('users/junior')?>">>>>返回首页</a>
                    <?php endif;?>

                    </td>
                </tr>
                <tr>
                    <th>编号</th>
                    <th>登录帐号</th>
                    <th>姓名</th>
                    <th>联系电话</th>
                    <th>联系邮箱</th>
                    <th>用户余额</th>
                    <th>特权</th>
                    <th>注册时间</th>
                    <th>成员</th>
                    <th>操作</th>
                </tr>
                <?php foreach($list as $k => $v):?>
                    <tr>
                        <td><?=$v['id']?></td>
                        <td><?=$v['username']?></td>
                        <td><?=$v['uinfo']['name']?></td>
                        <td><?=$v['uinfo']['phone']?></td>
                        <td><?=$v['uinfo']['email']?></td>
                        <td><?=$v['uinfo']['money']?></td>
                        <td><?=$v['group']['title']?></td>
                        <td><?=date('Y-m-d H:i:s',$v['create_time'])?></td>
                        <td><?=$v['num']?></td>
                        <?php if($group['condition'] <= $v['group']['condition']): ?>
                            <td style="color: red" title="级别不高于对方，无法查看 ">-- 权限不高于对方，无法查看 --</td>
                        <?php else:?>
                            <?php if($v['num'] > 0):?>
                                <td>
                                    <a href="<?=site_url('users/junior?tier='.$v['tier'].'&pid='.$v['id'])?>">查看</a>
                                </td>
                            <?php else:?>
                                <td title="用户没有下级，不能查看">查看</td>
                            <?php endif;?>

                        <?php endif;?>
                    </tr>
                <?php endforeach;?>
            </table>
            <div>
            </div>
        </div>
</div>